package com.fb.service.impl;

import com.fb.dao.BingMapper;
import com.fb.model.Bing;
import com.fb.service.IBingService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BingServiceImpl implements IBingService {
    private Logger log = Logger.getLogger(getClass());
    @Autowired
    private BingMapper bingDao;

    @Override
    public Bing add(Bing bing) {
        bingDao.insertSelective(bing);
        return bing;
    }

    @Override
    public List<Bing> list(Bing bing) {
        return bingDao.query(bing);
    }

    @Override
    public Bing update(Bing bing) {
        bingDao.updateByPrimaryKeySelective(bing);
        return bing;
    }
}
